package com.clz.workorder.adapter

import android.view.View
import androidx.databinding.BindingAdapter
import com.github.nikartm.button.FitButton
import com.jakewharton.rxbinding3.view.visibility

object ViewAdapter {
    @JvmStatic
    @BindingAdapter(value = ["visible","text"],requireAll = false)
    fun setFitButtonVisible(fb:FitButton,v:Boolean,s:String){
        fb.visibility=if (v) View.VISIBLE else View.GONE
        fb.setText(s)
        fb
    }
}